<%@ page import="javax.naming.InitialContext" %>
<%@ page import="javax.naming.Context" %>
<%@ page import="basedao.BaseDao" %>
<%@ page import="java.sql.Connection" %><%--
  Created by IntelliJ IDEA.
  User: Root404
  Date: 2023/5/22
  Time: 10:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    BaseDao baseDao = new BaseDao();
    Connection connection2 = baseDao.getConnection2();
    out.print("链接成功");
    //上下文接口实例化
    Context context = new InitialContext();
    //调用他自己带的方法来实现namejndi提取
    //String Object
   String name= (String)context.lookup("java:comp/env/t163");
   out.print(name);

%>

</body>
</html>
